<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<s:url value="/js" var="jsPath"/>
<s:url value="/css" var="cssPath"/>
<script type="text/javascript">
<!--
$().ready( function() {
		var defaultShip = $('#shipExpenseRank').val().split(",");

		for ( i=1;i<7 ;i++) {
			if ("1" == defaultShip[i-1]) {
				$("#shipExpenseRank"+i).attr('checked',true);
			} else {
				$("#shipExpenseRank"+i).attr('checked',false);
			}
		}
		
	});

//-->
</script>
<h1>运费折抵活动管理</h1>
<table width="700">
	<tr class="tb-data">		
		<th>活动名称</th>
		<td>${campaign.campaignName}</td>
	</tr>
	<tr class="tb-data">
		<th>活动起始日期时间</th>
		<td><fmt:formatDate value="${campaign.startDateTime}" pattern="yyyy-MM-dd HH:mm"/></td>
	</tr>
	<tr class="tb-data">
		<th>活动结束日期时间</th>
		<td><fmt:formatDate value="${campaign.endDateTime}" pattern="yyyy-MM-dd HH:mm"/></td>
	</tr>
	<tr class="tb-data">
		<th>适用会员等级</th>
		<td>${menuMemberRank.options[campaign.allowMemberRank].name}</td>
	</tr>
	<tr class="tb-data">		
		<th>* 适用区域</th>
		<td>
		<input name="shipExpenseRank1" id="shipExpenseRank1" value="1" type="checkbox" disabled="disabled" readonly=true><label for="shipExpenseRank1">一区(上海)</label><BR>
		<input name="shipExpenseRank2" id="shipExpenseRank2" value="1" type="checkbox" disabled="disabled" readonly=true><label for="shipExpenseRank2">二区(江苏  浙江  安徽  北京  广东)</label><BR>
		<input name="shipExpenseRank3" id="shipExpenseRank3" value="1" type="checkbox" disabled="disabled" readonly=true><label for="shipExpenseRank3">三区(天津  河北  山东  福建)</label><BR>
		<input name="shipExpenseRank4" id="shipExpenseRank4" value="1" type="checkbox" disabled="disabled" readonly=true><label for="shipExpenseRank4">四区(湖南  湖北  河南  江西  四川  重庆  山西)</label><BR>
		<input name="shipExpenseRank5" id="shipExpenseRank5" value="1" type="checkbox" disabled="disabled" readonly=true><label for="shipExpenseRank5">五区(广西  陕西  云南  贵州  辽宁  吉林  黑龙江  海南  甘肃  青海  宁夏)</label><BR>
		<input name="shipExpenseRank6" id="shipExpenseRank6" value="1" type="checkbox" disabled="disabled" readonly=true><label for="shipExpenseRank6">六区(新疆  西藏  内蒙)</label><BR>
		<s:hidden name="campaign.shipExpenseRank" id="shipExpenseRank" />
		</td>
	</tr>
	<tr class="tb-data">
		<th>最低订单金额</th>
		<td>${campaign.minOrderAmount}</td>
	</tr>
	<tr class="tb-data">
		<th>折扣 kg</th>
		<td>${campaign.discountData}<%--
		<s:iterator value="menuPaymentType.options" var="opt">
			<c:out value="${opt.value.name} : ${campaign.discount[opt.key]}"/><br/>
		</s:iterator> --%>
		</td>
	</tr>
	<tr class="tb-data">
		<th>启用</th>
		<td><c:if test="${campaign.enable}">是</c:if><c:if test="${!campaign.enable}">否</c:if></td>
	</tr>
	<tr class="tb-data">
		<th>备注</th>
		<td>${campaign.memo}</td>
	</tr>	
	<tr class="tb-data">
		<th>购物车提示HTML</th>
		<td>${campaign.shoppingHtml}</td>
	</tr>
	<tr class="tb-data">
		<th>结帐页提示HTML</th>
		<td>${campaign.orderinfoHtml}</td>
	</tr>	
</table>
<p></p>

<p></p>
<div class="f-link">
	<a href="search.do">回查询页</a>
	<a href="edit.do">修改</a>
	<a href="delete.do">删除</a>
</div>